<template>
    <el-dialog
    title="编辑"
    :visible="isShowEditDialog"
    @close="dialogClose"
      >
    <el-form :model="ruleForm" :rules="rules" ref="profitEditForm" label-width="100px">

      <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="支付订单编号" prop="orderId">
                  <el-input v-model="ruleForm.orderId" readonly="readonly"></el-input>
              </el-form-item>
          </el-col>
      </el-row>

      <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="拍卖会名称" prop="auctionName">
                  <el-input v-model="ruleForm.auctionName"></el-input>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item label="标的名称" prop="objectName">
                  <el-input v-model="ruleForm.objectName"></el-input>
              </el-form-item>
          </el-col>
      </el-row>

      <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="委托方" prop="client">
                  <el-input v-model="ruleForm.client"></el-input>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item label="成交金额" prop="transactionPrice">
                  <el-input v-model="ruleForm.transactionPrice"></el-input>
              </el-form-item>
          </el-col>
      </el-row>

      <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="软件使用费" prop="royalty">
                  <el-input v-model="ruleForm.royalty"></el-input>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item label="佣金" prop="commission">
                  <el-input v-model="ruleForm.commission"></el-input>
              </el-form-item>
          </el-col>
      </el-row>

      <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="总金额" prop="totalPrice">
                  <el-input v-model="ruleForm.totalPrice"></el-input>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item label="竞买人" prop="bidder">
                  <el-input v-model="ruleForm.bidder"></el-input>
              </el-form-item>
          </el-col>
      </el-row>

    </el-form>
  
    <span style="display: flex;">
          <div style="flex: 1"></div>
        <el-button @click="dialogClose">取 消</el-button>
        <el-button type="primary" @click="submitData">确 定</el-button>
    </span>
  
  </el-dialog>
  
  </template>
  
  <script>
  export default {
      data(){
          return{
              ruleForm: {
                  orderId: '',
                  auctionName: '',
                  objectName: '',
                  client: '',
                  transactionPrice: '',
                  royalty: '',
                  commission: '',
                  totalPrice: '',
                  bidder: ''
              },
              rules:{
                  auctionName:[
                      {required: true, message: '请输入'}
                  ],
                  objectName:[
                      {required: true, message: '请输入'}
                  ],
                  client:[
                      {required: true, message: '请输入'}
                  ],
                  transactionPrice:[
                      {required: true, message: '请输入'}
                  ],
                  royalty:[
                      {required: true, message: '请输入'}
                  ],
                  commission:[
                      {required: true, message: '请输入'}
                  ],
                  totalPrice:[
                      {required: true, message: '请输入'}
                  ],
                  bidder:[
                      {required: true, message: '请输入'}
                  ],
              }
          }
      },
      props:{
          isShowEditDialog:{
              type:Boolean
          },
      },
      methods: {
          dialogClose(){ 
              this.$emit('dialogClose');
          },
          submitData(){
            this.$refs.profitEditForm.validate((valid) => {
                if (!valid) {
                    return
                }
                else {
                    this.$emit('dialogClose')
                }
            });
        },
  
      }
  }
  </script>
  
  <style scoped lang="less">
    .select{
          width: 100%;
      }
  </style>
  
  